<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/','Index\Entry@index')->name('home');

//用户管理资源路由
Route::resource('/user','Index\UserController');
//加载登录模板路由
Route::get('/login','Index\LoginController@loginForm')->name('login');
//处理登录路由
Route::post('/login','Index\LoginController@login')->name('login');
//退出登录路由
Route::get('/logout','Index\LoginController@logout')->name('logout');

//激活账号路由
Route::get('/confirmEmail/{token}','Index\UserController@confirmEmail')->name('confirmEmail');

//找回密码填写邮箱路由
Route::get('/writeEmail','Index\PasswordController@writeEmail')->name('writeEmail');
//找回密码点击确定路由
Route::post('/send','Index\PasswordController@send')->name('send');
//重置密码路由
Route::get('/resetPassword/{email}','Index\PasswordController@resetPassword')->name('resetPassword');
//处理重置密码路由
Route::post('/update','Index\PasswordController@update')->name('update');

//博客管理资源路由
Route::resource('/blog','Index\BlogController');

